import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/home'
import Shopcar from '@/views/shopcar'
import Member from '@/views/member'
import Search from '@/views/search'
import NewsList from '@/views/news/newsList'
import NewsInfo from '@/views/news/newsInfo'
import PhotoList from '@/views/photos/photolist'
import PhotoInfo from '@/views/photos/photoInfo'
import GoodsList from '@/views/goods/goodslist'
import GoodsInfo from '@/views/goods/goodsInfo'
import GoodsDesc from '@/views/goods/goodsDesc'
import GoodsComment from '@/views/goods/goodsComment'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: {name: 'Home'}
    },
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    {
      path: '/home/newslist',
      name: 'NewsList',
      component: NewsList
    },
    {
      path: '/home/newsInfo/:id',
      name: 'NewsInfo',
      component: NewsInfo
    },
    {
      path: '/shopcar',
      name: 'Shopcar',
      component: Shopcar
    },
    {
      path: '/member',
      name: 'Member',
      component: Member
    },
    {
      path: '/home/photoslist',
      name: 'PhotoList',
      component: PhotoList
    },
    {
      path: '/home/photoInfo/:id',
      name: 'PhotoInfo',
      component: PhotoInfo
    },
    {
      path: '/home/goodslist',
      name: 'GoodsList',
      component: GoodsList
    },
    {
      path: '/home/goodsinfo/:id',
      name: 'GoodsInfo',
      component: GoodsInfo
    },
    {
      path: '/home/goodsDesc/:id',
      name: 'GoodsDesc',
      component: GoodsDesc
    },
    {
      path: '/home/goodsComment/:id',
      name: 'GoodsComment',
      component: GoodsComment
    },
    {
      path: '/search',
      name: 'Search',
      component: Search
    }
  ],
  linkActiveClass: 'mui-active'
})
